package com.zhonglz.util.sm3;

import org.bouncycastle.crypto.digests.SM3Digest;

public class Sm3Utils {
	
	// sm3摘要生成
	public static byte[] generateSm3(byte[] srcData) {
		SM3Digest digest = new SM3Digest();
		digest.update(srcData, 0, srcData.length);
		byte[] hash = new byte[digest.getDigestSize()];
        digest.doFinal(hash, 0);
        return hash;
	}

}
